package cqrtplm.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class UserQueryDTO {

    private String typeInthid;
    @ApiParam("页码")
    private int pageNum;
    @ApiParam("每页条数")
    private int pageSize;

    private String isQueryDTO;

    @JsonProperty("filterParams")
    private Map<String, ConditionGroup> conditions;

    @Data
    public static class ConditionGroup {
        @ApiParam("条件连接符：or/and")
        private String logic;
        private List<Condition> conditions;
    }

    @Data
    public static class Condition {

        private String operator;

        private String value;
    }


}
